<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "pre_note".
 *
 * @property int $id 知识ID
 * @property int $c1 一级分类
 * @property int $c2 一级分类
 * @property int $c3 一级分类
 * @property int $cid 分类ID
 * @property string $question 问题
 * @property string $answer 答案
 * @property int $dateline 发布时间
 * @property string $last_right_time 最近一次答对的时间
 * @property int $right 回答正确的次数
 * @property int $graduated 毕业的
 * @property int $displayorder 显示顺序
 * @property int $passable 是否通过审核：0审核中，1已审核，2未通过
 * @property int $status 状态：-2删除，-1草稿，0正常
 */
class Note extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'pre_note';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['c1', 'c2', 'c3', 'cid', 'dateline', 'last_right_time', 'right', 'graduated', 'displayorder', 'passable', 'status'], 'integer'],
            [['answer'], 'string'],
            [['question'], 'string', 'max' => 300],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'c1' => 'C1',
            'c2' => 'C2',
            'c3' => 'C3',
            'cid' => 'Cid',
            'question' => 'Question',
            'answer' => 'Answer',
            'dateline' => 'Dateline',
            'last_right_time' => 'Last Right Time',
            'right' => 'Right',
            'graduated' => 'Graduated',
            'displayorder' => 'Displayorder',
            'passable' => 'Passable',
            'status' => 'Status',
        ];
    }
}
